package com.demo.inheritance;

import com.demo.inheritance.animals.Animal;
import com.demo.inheritance.animals.Dog;
import com.demo.inheritance.birds.Bird;
import com.demo.inheritance.birds.Parrot;

public class InheritanceMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		LivingBeings dog = new Dog();
		LivingBeings dog1 = new Animal(4, true);
		
		dog.speak();
		dog.fly();
		dog.move();
		
		Dog dog2 = (Dog) dog;
		dog2.someDummy();
		
		
		dog1.speak();
		dog1.fly();
		dog1.move();
		
		
		LivingBeings parrot = new Parrot();
		LivingBeings parrot1 = new Bird(2, 2);
		
		
		parrot.speak();
		parrot.fly();
		parrot.move();
		
		
		parrot1.speak();
		parrot1.fly();
		parrot1.move();
		
		
		

	}

}
